<script type="text/javascript">
    function confirmRegisterStudent(){
       var data = $('#form-confirm-register-account-student').serialize();
       $.ajax({
           type:'POST',
           url:'<?php echo Yii::app()->createUrl("site/confirmRegisterStudent") ?>',
           data:data,
           success:function(data){
               
           },
           error:function(data){
               
           },
           dataType:'html'
           
       });
        return false;
    }
</script>
<?php /** @var BootActiveForm $form */
/*    $this->pageTitle=Yii::app()->name . ' - select language';
    $this->breadcrumbs=array(
            '言語選択',
    );
   */

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
    'id'=>'form-confirm-register-account-student',
    'htmlOptions'=>array('class'=>'wells'),
)); ?>
<table cellspacing="-20">
    <tr>
        <td colspan="2" style="color: #2490d8; font-weight: bold">
            <?php echo Yii::t('strings','Personal information') ?>
        </td>
    </tr>
    <tr>
        <td width="70%" style="padding: 0px 1px 0px 0px;">
            <table style="width: 100%; margin: 0px; ">
                <tbody>
                    <tr style="background-color: #ecf0f1;border-bottom: 2px solid white;">
                        <td style="text-align: left;font-weight: bold" width="20%"> <?php echo  Yii::t('strings','Phonetic') ?></td>
                        <td height="30" style="padding-top: 10px;">
                            <?php echo $form->hiddenField($model, 'phonetic') ?>
                            <?php echo $model->phonetic?>
                        </td>
                    </tr>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
                        <td style="text-align: left;"> <?php echo Yii::t('strings','Name') ?></td>
                        <td style="padding-top: 10px;">
                            <?php echo $form->hiddenField($model_member, 'name') ?>
                            <?php echo $model_member->name ?>
                        </td>
                    </tr>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
                        <td style="text-align: left;"> <?php echo Yii::t('strings','Romaji character') ?></td>
                        <td style="padding-top: 10px;">
                            <?php echo $form->hiddenField($model, 'romaji') ?>
                            <?php echo $model->romaji ?>
                        </td>
                    </tr>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
                        <td style="text-align: left;"> <?php echo Yii::t('strings','E-mail') ?></td>
                        <td style="padding-top: 10px;">
                            <?php echo $form->hiddenField($model_member, 'email') ?>
                            <?php echo $model_member->email ?>
                        </td>
                    </tr>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
                        <td style="text-align: left;"> <?php echo Yii::t('strings','Birthday') ?></td>
                        <td style="padding-top: 10px;">
                            <?php echo $form->hiddenField($model, 'birth_date') ?>
                            <?php echo $model->birth_date ?>
                        </td>
                    </tr>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
                        <td style="text-align: left;"> <?php echo Yii::t('strings','ID No') ?></td>
                        <td style="padding-top: 10px;">  
                            <?php echo $form->hiddenField($model, 'id_NO') ?>
                            <?php echo $model->id_NO ?>
                        </td>
                    </tr>
                </tbody>
            </table>
        </td>
        <td width="30%" style="padding: 0px 0px 1px 3px;">
            <table style="width: 100%;margin: 0px;">
                <tbody>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white; ">
                        <td>
                             
                        </td>
                        
                        <td>                          
                        </td>
                        <td style="padding-bottom: 8px;padding-top: 8px; text-align: left;padding-right: 40px;">
                            <?php $url_avatar;
                            if ($model->url_avatar) {
                                $url_avatar = $model->url_avatar;
                            } else {
                               $url_avatar = '/images/regist/avatarimg.png'; 
                            }
                                
                            ?>
                            <?php echo $form->hiddenField($model, 'url_avatar') ?>
                            <img style="width: 110px; height: 140px;" id="upload-preview" src="<?php echo Yii::app()->request->baseUrl.$url_avatar ?>">
                        </td>
                    </tr>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
                        <td style="text-align: left;padding-left: 10%" colspan="3" height="25px;">
                         <?php if($model->male == 1){
                              echo Yii::t('strings','Male'); 
                           } else{
                               echo Yii::t('strings','FeMale'); 
                           } ?>
                        </td>
                    <?php echo $form->hiddenField($model, 'male') ?>            
                    </tr>
                    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
                        <td style="text-align: right;"> </td>
                        <td style="text-align: right;">
                            <?php echo Yii::t('strings','Student No.') ?>
                        </td>
                        <td style="padding-top: 10px;">                           
                            
                            <?php echo $form->hiddenField($model, 'student_NO') ?>  
                            <?php echo $model->student_NO ?>
                        </td>
                    </tr>
                  
                </tbody>
            </table>
        </td>
    </tr>
    
    <tr style="background-color: #ecf0f1; border-bottom: 2px solid white;">
        <td colspan="2">
            <table style="margin: 0px;">
                <tr>
                    <td style="text-align: left;" width="14%">
                      <?php echo Yii::t('strings','Present address') ?>   
                    </td>
                    <td>
                         <?php echo $form->hiddenField($model, 'address') ?> 
                         <?php echo $model->address ?>
                    </td>
                </tr>
            </table>
        </td> 
    </tr>
    <!-- begin tel -->
    <tr style="background-color: #ecf0f1;">
        <td colspan="2">
            Tel.
        </td>
    </tr>
    <tr style="background-color: #f5f8f9;">
        <td>
            <table style="margin:0px;">
                <tr>
                    <td style="text-align: left; width: 20%;">
                      <?php echo Yii::t('strings','Phone number') ?>  
                    </td>
                    <td>
                     <?php echo $form->hiddenField($model, 'phone') ?> 
                       <?php echo $model->phone ?>  
                    </td>
                </tr>
            </table>       
       </td>
         <td>
             <table style="margin: 0px;">
                <tr>
                    <td style="width:30%">
                      <?php echo Yii::t('strings','Mobile number') ?>  
                    </td>
                    <td>
                      <?php echo $form->hiddenField($model, 'mobile') ?> 
                       <?php echo $model->mobile ?>  
                    </td>
                </tr>
            </table>                    
        </td>
    </tr>
    <tr style="background-color: #ecf0f1; border-top: 2px solid white;">
        <td colspan="2">
            <?php echo Yii::t('strings','Parent information') ?>.
        </td>
    </tr>
    <tr style="background-color: #f5f8f9;">
        <td>
            <table style="margin:0px;">
                <tr>
                    <td style="text-align: left; width: 20%;">
                      <?php echo Yii::t('strings','Your father name') ?>  
                    </td>
                    <td>
                        <?php echo $form->hiddenField($model, 'father_name') ?>
                       <?php echo $model->father_name ?>  
                    </td>
                </tr>
            </table>       
       </td>
         <td>
             <table style="margin: 0px;">
                <tr>
                    <td style="text-align: left;" width="30%">
                      <?php echo Yii::t('strings','Your father phone number') ?>  
                    </td>
                    <td >
                        <?php echo $form->hiddenField($model, 'father_phone') ?>
                       <?php echo $model->father_phone ?>  
                    </td>
                </tr>
            </table>                    
        </td>
    </tr>  
    <tr style="background-color: #ecf0f1;">
        <td colspan="2">
              <table style="margin: 0px;">
                <tr>
                    <td style="text-align: left; width: 14%">
                      <?php echo Yii::t('strings','Class name') ?>   
                    </td>
                    <td>
                        <?php echo $form->hiddenField($model, 'class_name') ?>
                         <?php echo $model->class_name ?>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <h5 style="color: #2490d8"> Education</h5>
        </td>
    </tr>
    <tr style="background-color: #ecf0f1;">
        <td>
            <table style="margin:0px;">
                <tr>
                    <td style="width: 20%; text-align: left;">
                        <?php echo Yii::t('strings','Final Place') ?>
                    </td>
                    <td>
                        <?php echo $form->hiddenField($model, 'final_year') ?>
                        <?php echo $form->hiddenField($model, 'final_month') ?>
                        <?php echo $model->final_year.'/'.$model->final_month ?>
                    </td>
                </tr>
            </table> 
        </td>
        <td>
            
        </td>
    </tr>
    <tr style="background-color: #f5f8f9;">
        <td>
            <table style="margin:0px;">
                <tr>
                    <td style="width: 20%">
                       <?php echo $form->labelEx($model, 'final_schoolAddress') ?>   
                    </td>
                    <td> 
                        <?php echo $form->hiddenField($model, 'final_schoolAddress') ?>
                       <?php echo $model->final_schoolAddress ?>                         
                    </td>
                </tr>
            </table>
        </td>
        <td>
            <table style="margin:0px;">
                <tr>
                    <td style="width:40%">
                       <?php echo $form->labelEx($model, 'final_address') ?>   
                    </td>
                    <td>
                        <?php echo $form->hiddenField($model, 'final_address') ?>
                       <?php echo $model->final_address ?>                         
                    </td>
                </tr>
            </table>            
        </td>
    </tr>
    <tr style="background-color: #ecf0f1;">
        <td colspan="2" style=" border-top: 2px solid white;">
           <?php echo Yii::t('strings','Studying Place') ?> 
        </td>
    </tr>
    <tr style="background-color: #f5f8f9;">
        <td>
             <table style="margin:0px;">
                <tr>
                    <td style="width: 20%">
                       <?php echo $form->labelEx($model, 'studying_schoolName') ?>   
                    </td>
                    <td>
                        <?php echo $form->hiddenField($model, 'studying_schoolName') ?>
                       <?php echo $model->studying_schoolName ?>                         
                    </td>
                </tr>
            </table>           
        </td>
        <td>
              <table style="margin:0px;">
                <tr>
                    <td style="width: 40%">
                       <?php echo $form->labelEx($model, 'studying_faculty') ?>   
                    </td>
                    <td> 
                        <?php echo $form->hiddenField($model, 'studying_faculty') ?>
                       <?php echo $model->studying_faculty ?>                         
                    </td>
                </tr>
            </table>   
        </td>
    </tr>
        <tr style="background-color: #f5f8f9; border-top: 2px solid white;">
        <td>
             <table style="margin:0px;">
                <tr>
                    <td style="width: 20%">
                       <?php echo $form->labelEx($model, 'studying_dept') ?>   
                    </td>
                    <td>
                         <?php echo $form->hiddenField($model, 'studying_dept') ?>
                       <?php echo $model->studying_dept ?>                         
                    </td>
                </tr>
            </table>           
        </td>
        <td>
              <table style="margin:0px;">
                <tr>
                    <td style="width: 40%">
                       <?php echo $form->labelEx($model, 'studying_grade') ?>   
                    </td>
                    <td>
                        <?php echo $form->hiddenField($model, 'studying_grade') ?>
                       <?php echo $model->studying_grade ?>                         
                    </td>
                </tr>
            </table>   
        </td>
    </tr>
    <tr style="background-color: #ecf0f1;">
        <td colspan="2" style="padding-left: 10px; border-top: 2px solid white;">
           <?php echo Yii::t('strings','Ability/ Licensing/ Qualifications') ?> 
        </td>
    </tr>
    <?php
       
        foreach ($infoOther->AbilityDetail as $key => $value) { ?>
            <tr style="background-color: #f5f8f9;border-top: 2px solid white;">
                <td colspan="2">
                      <table style="margin:0px;">
                        <tr>
                            <td style="width: 10%">
                            <?php echo $infoOther->abiYear[$key].'/'.$infoOther->abiMonth[$key] ?>                       
                            </td>
                            <td style="width: 10%; text-align: center;">
                                <?php echo Yii::t('strings','Detail') ?>   
                            </td>
                            <td>
                                <?php echo $infoOther->AbilityDetail[$key] ?>
                            </td>
                        </tr>
                    </table>             
                </td>
        <?php }
    ?>
    </tr>
    <tr>
        <td colspan="2" style="color:#2490d8; "><?php echo Yii::t('strings','Experience') ?></td>
    </tr>
    <tr style="background-color: #ecf0f1;">
        <td colspan="2" style="padding-left: 10px;">
            <?php echo Yii::t('strings','Domestic/ Overseas') ?>
        </td>
    </tr>
    <tr>
        <td colspan="2" style="padding: 0px;">
            <table style="margin: 0px;">
                <tr>
                    <td style="background-color: #ecf0f1;text-align: center;" width="20%">
                         <?php echo Yii::t('strings','Domestic') ?>
                    </td>
                    <td style="padding: 0px;">
                  <table style="margin: 0px;">
                   <?php foreach($infoOther->DomesticDetail as $key=>$value){  ?>
                   <tr style="background-color: #f5f8f9; border-top: 2px solid white;">
                    <td width="5%">
                        <?php echo $infoOther->DomesticYear[$key].'/'.$infoOther->DomesticMonth[$key] ?>                         
                    </td>
                    <td width="5%">
                        <?php echo Yii::t('strings','Detail') ?>
                    </td>
                    <td>
                        <?php echo $infoOther->DomesticDetail[$key] ?>    
                    </td>
                </tr> <?php }
                ?>
            </table>                        
                    </td>
                </tr>
            </table>
        </td>

    </tr>   
    <tr style="border-top: 3px solid white;">
        <td colspan="2" style="padding: 0px;">
            <table style="margin: 0px;">
                <tr>
                    <td style="background-color: #ecf0f1;text-align: center;" width="20%">
                         <?php echo Yii::t('strings','Overseas') ?>
                    </td>
                    <td style="padding: 0px;">
               <table style="margin: 0px;">

                   <?php echo $form->hiddenField($infoOther,'OverseasYear[]') ?>
                    <?php echo $form->hiddenField($infoOther,'OverseasMonth[]') ?>
                   <?php foreach ($infoOther->OverseasDetal as $key => $value) { ?>  
                     <?php echo $form->hiddenField($infoOther,'OverseasDetal[]', array(  
                         'value'=>$value
                   )) ?>
                   <tr style="background-color: #f5f8f9;border-top: 2px solid white;">
                    <td width="5%">
                        <?php echo $infoOther->OverseasYear[$key].'/'.$infoOther->OverseasMonth[$key] ?>                        
                    </td>
                    <td width="5%">
                        <?php echo Yii::t('strings','Detail') ?>
                    </td>
                    <td>
                        <?php echo $infoOther->OverseasDetal[$key] ?>      
                    </td>
                </tr> <?php } ?>
            </table>                        
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr style="background-color: #ecf0f1; border-top: 3px solid white;">
        <td colspan="2">
            <table style="margin: 0px;">
                <tr>
                    <td style="text-align: center; width: 20%;">
                          <?php echo $form->labelEx($model,'job_objective') ?>
                    </td>
                    <td>
                        <?php echo $model->job_objective ?>
                    </td>
                </tr>
            </table>
        </td> 
    </tr>
    <tr style="background-color: #ecf0f1; border-top: 3px solid white;">
        <td colspan="2">
            <table style="margin: 0px;">
                <tr>
                    <td style="text-align: center; width: 20%;">
                          <?php echo $form->labelEx($model, 'admiss_purpose') ?> 
                    </td>
                    <td>
                        <?php echo $model->admiss_purpose ?>
                    </td>
                </tr>
            </table>
        </td> 
    </tr>
    <tr>
        <td colspan="2" style="color: #2490d8">
            <?php echo Yii::t('strings','Survey') ?>
        </td>
    </tr>
    <tr style="background-color: #ecf0f1;">
        <td colspan="2">
            <table>
                <tr>
                    <td style="width: 20%;">
                       <?php echo Yii::t('strings','After coming back, what do you want to do?') ?> 
                    </td>
                    <td>
                        <?php  echo $model_survey->com_back?>   
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr style="background-color: #ecf0f1; border-top: 2px solid white;">
        <td colspan="2">
            <table style="margin:0px;">
                <tr>
                    <td width="50%">
                      <?php echo Yii::t('strings','Do you have a mobile phone?') ?>    
                    </td>
                    <td>
                        <?php  if($model_survey->have_mobile == 1){
                            echo Yii::t('strings','Yes');
                        } else {
                            echo Yii::t('strings','No');
                        } ?>                       
                    </td>
                    <td>
           
                    </td>
                </tr>
            </table>
        </td>
    </tr>
        <tr style="background-color: #ecf0f1; border-top: 2px solid white;">
        <td colspan="2">
            <table style="margin:0px;">
                <tr>
                    <td width="50%">
                     <?php echo Yii::t('strings','Did you buy Japanese for everyone CD?') ?>   
                    </td>
                    <td>
                        <?php  if($model_survey->buy_CD == 1){
                            echo Yii::t('strings','Yes');
                        } else {
                            echo Yii::t('strings','No');
                        } ?>                      
                    </td>
                    <td>
                    
                    </td>
                </tr>
            </table>
        </td>
    </tr>
        <tr style="background-color: #ecf0f1; border-top: 2px solid white;">
        <td colspan="2">
            <table style="margin:0px;">
                <tr>
                    <td width="50%">
                    <?php echo Yii::t('strings','Do you listen to Japanese for Everyone CD?') ?>   
                    </td>
                    <td>
                        <?php  if($model_survey->listen_CD == 1){
                            echo Yii::t('strings','Yes');
                        } else {
                            echo Yii::t('strings','No');
                        } ?>                      
                    </td>
                    <td>
   
                    </td>
                </tr>
            </table>
        </td>
    </tr>
     <tr style="background-color: #ecf0f1; border-top: 2px solid white;">
        <td colspan="2">
            <table style="margin:0px;">
                <tr>
                    <td width="50%">
                    <?php echo Yii::t('strings','Have you saved voice file of Japanese for Everyone in mobile?') ?>   
                    </td>
                    <td>
                        <?php  if($model_survey->voice == 1){
                            echo Yii::t('strings','Yes');
                        } else {
                            echo Yii::t('strings','No');
                        } ?>                       
                    </td>
                    <td>
  
                    </td>
                </tr>
            </table>
        </td>
    </tr>

    <tr>
        <td colspan="2" style="color: #2490d8">
            <?php echo Yii::t('strings','※Before filling out the application form, please read the following things:') ?>  
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <?php echo Yii::t('strings','Would you please let we use your picture, etc.. in public relations activities?  (Agree/ Not Agree)') ?><br>
            <?php echo Yii::t('strings','*　Totally agreeing with the above things, I will enroll as a student in TOKYO SCHOOL.') ?>
        </td>
    </tr>
        <tr>
            <td style="text-align:left;">
                 <?php echo CHtml::submitButton(Yii::t('strings','Back'), array(
                    'id'=>'select_back_register',
                    'onclick'=>'return backRegisterStudent();'
                )) ?>               
            </td>
            <td style="text-align: right;">
                <?php echo CHtml::submitButton(Yii::t('strings','Next'), array(
                    'id'=>'select_next_register',
                    'onclick'=>'return confirmRegisterStudent();'
                )) ?>
            </td>
        </tr>
</table>
<?php $this->endWidget(); ?>